package cn.tedu.tmall.admin.content.dao.persist.respository.impl;

import cn.tedu.tmall.admin.content.dao.persist.mapper.ArticleDetailMapper;
import cn.tedu.tmall.admin.content.dao.persist.mapper.ArticleMapper;
import cn.tedu.tmall.admin.content.dao.persist.respository.IArticleRepository;
import cn.tedu.tmall.admin.content.pojo.po.ArticleDetailPO;
import cn.tedu.tmall.admin.content.pojo.po.ArticlePO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class ArticleRepositoryImpl implements IArticleRepository {

    @Autowired
    private ArticleMapper articleMapper;

    @Autowired
    private ArticleDetailMapper articleDetailMapper;

    @Override
    public Integer save(ArticlePO articlePO) {
        return articleMapper.insert(articlePO);
    }

    @Override
    public Integer saveArticleDetail(ArticleDetailPO articleDetailPO) {
        return articleDetailMapper.insert(articleDetailPO);
    }
}
